//
//  HeaderImageCell.m
//  详细资料
//
//  Created by 李贺 on 2017/1/6.
//  Copyright © 2017年 李贺. All rights reserved.
//

#import "HeaderImageCell.h"

#import "Masonry.h"

@interface HeaderImageCell ()

@end

@implementation HeaderImageCell


// 重写父类的初始化方法,在此方法中添加cell中的子控件
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 添加子控件
        [self setupUI];
    }
    return self;
}

#pragma mark - 添加cell中的子控件

- (void)setupUI {
    
    self.headIcon = [[UIImageView alloc] init];
    self.headIcon.layer.cornerRadius = 50;
    self.headIcon.clipsToBounds = YES;
    self.headIcon.layer.borderColor = [UIColor whiteColor].CGColor;
    self.headIcon.layer.borderWidth = 3;
    
    
    [self.contentView addSubview:_headIcon];
    
    self.headIcon.backgroundColor= [UIColor greenColor];
    
    [self.headIcon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.centerY.equalTo(self.contentView);
        make.width.height.offset(100);
    }];
}


@end
